package com.pzhu.gmall.manage.controller;

import java.util.List;

import com.pzhu.gmall.bean.PmsProductImage;
import com.pzhu.gmall.service.ImgService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 刘鹏 liupeng
 * @date 2019/11/1
 **/
@RestController
@CrossOrigin
@RequestMapping("img")
public class ImgController {
    @Reference
    private ImgService imgService;

    @GetMapping
    public List<PmsProductImage> pmsProductImages(String spuId) {
        return imgService.getImgList(spuId);
    }
}
